1. Field of the Invention
This invention relates to a reciprocal arithmetic circuit for deriving a reciprocal 1/A of a divisor A, and more particularly to a reciprocal arithmetic circuit used in a divider circuit.
2. Description of the Related Art
In general, a division B/A is calculated by multiplying the reciprocal 1/A of a divisor A by a dividend B. A typical example for a divider circuit of performing the division B/A is shown in FIG. 1. In FIG. 1, 1 denotes a conversion table for converting the divisor A into the reciprocal 1/A and the conversion table is constituted by a read only memory (ROM). In FIG. 1, 2 denotes a multiplier circuit.
All the bits of the divisor A are supplied as an address signal to the conversion table 1 and reciprocal table information stored in the conversion table 1 is searched for according to the address signal. However, in the all-bit or full-bit method in which all the bits of the divisor A are used, it is necessary for the ROM constituting the conversion table to have an extremely large memory capacity. For example, when the divisor A is of 16 bits and the reciprocal 1/A is expressed by 16 bits, the memory capacity of the ROM must be 2.sup.16 words or 2.sup.16 .times.16=1 Mbits. In this way, in the full-bit method in which the reciprocal 1/A is derived by use of all the bits of the divisor A, a large ROM memory capacity is necessary, increasing the cost of a LSI circuit in which the divider circuit is integrated.
In general, an approximation arithmetic method using Newton's method is used as an arithmetic method of deriving the reciprocal 1/A with a small ROM memory capacity.
In the above approximation arithmetic method, upper-digit bits AH of the divisor A are first input as an address signal to the conversion table and table information of the conversion table is searched for according to the address signal. As a result, the primary approximate reciprocal 1/AH of the divisor A can be derived. Next, the primary approximate reciprocal 1/AH is subjected to the approximation process of Newton's method to derive the secondary approximate reciprocal which is more precise than the primary approximate reciprocal.
Now, the approximate calculation according to Newton's method is explained. FIG. 2 is a flowchart showing the approximate calculation according to Newton's method.
First, upper m-bit data AH of the divisor A are used as an address signal to search for table information in the ROM, thus deriving the primary approximate reciprocal R0=1/AH (steps S1 to S3). Then, the secondary approximate reciprocal R1 is derived by use of the following approximate equation (steps S4 and S5): EQU R1=R0.(2-A.R0) (1)
Further, R1 is used instead of R0 in Eq. (1) to calculate the same. As the calculation process is repeatedly effected, the secondary approximate reciprocal R1 approaches the reciprocal 1/A of A. A counter C counts the number of calculations, and the calculation of Eq. (1) is repeatedly effected until the count of the counter C reaches a preset loop number N. Therefore, the secondary approximate reciprocal R1 becomes more nearly equal to the reciprocal 1/A of the divisor A as the loop number N becomes larger.
FIG. 3 shows the relation between the bit number m of the upper-bit data AH, the size of the ROM constituting the conversion table and the loop number N in a case where the full-bit number of the divisor A is set to 16 bits.
As is clearly understood from FIG. 3, the ROM size becomes smaller as the bit number m of the upper-bit data AH becomes smaller. In contrast, an error in the primary approximate reciprocal R0 becomes larger as the bit number m of the upper-bit data AH becomes smaller, thereby making it necessary to increase the loop number N.
The approximate equation by Newton's method shown in Eq. (1) includes two multiplications. Therefore, in the approximate equation by Newton's method, it is necessary to effect multiplications of a number twice the loop number N. Since the multiplication is effected by repeatedly effecting additions, it takes a long time to effect the multiplication. Therefore, in the Newton's method, there occurs a problem that the loop number N becomes larger if the ROM size is reduced, and as a result time required for effecting the approximate calculation becomes larger.